import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

  const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path: '/wx',
    name: 'wx',
    component: () => import(/* webpackChunkName: "wx" */ '../views/wx.vue')
  },
  {
    path: '/jssdk',
    name: 'jssdk',
    component: () => import(/* webpackChunkName: "jssdk" */ '../views/jssdk.vue')
  },
  {
    path: '/jspay',
    name: 'jspay',
    component: () => import(/* webpackChunkName: "jspay" */ '../views/jspay.vue')
  },
  {
    path: '/h5pay',
    name: 'h5pay',
    component: () => import(/* webpackChunkName: "h5pay" */ '../views/h5pay.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
